﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%
IF Request.QueryString("Action")="login" Then
	call loginn
else
	call index
end if
end Function

Function index
urls=Request.QueryString("urls")
if urls="" then urls="index.asp"
select case v
case "0"
we0="<br/>"
we2="<br/>"
hr="-------------<br/>"
book1="<input name=""phone"" value=""""  size='15' emptyok=""true"" /><br/><anchor>快速搜索机型<go href=""search_phone.asp?sid="&sidd&""" method=""post""><postfield name=""kw"" value=""$(phone)"" /></go></anchor>"
%>
<card title="机型定制"><p align="<%=qingtian.px%>">
<%
case "1"
hr=""
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
we1="</div>"
book1="<form action=""search_phone.asp?sid="&sidd&""" method=""post""><input name='kw' emptyok=""true"" size='15' maxlength='128'/><br/><input type=""submit"" value=""快速搜索机型"" /></form>"
%>
<title>机型定制</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%
End Select
%>
<%=qingtian.qingsav("6999")%><%=dao%>请选择适合您的机型(如:诺基亚 N73,输入N73)<%=we0%><%=book1%>
<%
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "select top 3 id,name from qingtian_phonetai order by id asc"
Rs.Open Sql,conn,1,1
if not (rs.bof and rs.eof)  then
For i=1 to 3
		If Rs.Eof Then
			exit For
		End If
if i=1 then
Response.Write "<br/>"
else
Response.Write we0
end if
Response.Write(""&dao&"【<a href='search_phone.asp?urls="&urls&"&amp;kw="&server.URLEncode(rs("name"))&"&amp;sid="&sidd&"'>"&qingtian.utf8(rs("name"))&"</a>】"&we1&""&we&"")
Set Rss = Server.CreateObject("Adodb.Recordset")
Sqls = "select top 20 id,name from qingtian_phonemob where aid="&rs("id")&" order by td desc"
Rss.Open Sqls,conn,1,1
if not (rss.bof and rss.eof)  then
For j=1 to 16
		If Rss.Eof Then
			exit For
		End If
if j=1 then Response.Write we2
Response.Write("<a href='phone.asp?action=login&amp;id="&rss("id")&"&amp;urls="&urls&"&amp;sid="&sidd&"'>"&qingtian.utf8(rss("name"))&"</a> ")
	 	Rss.MoveNext
	  	Next
 	end if
Rss.close
set rss=nothing
	 	Rs.MoveNext
	  	Next
 	end if
Rs.close
set rs=nothing
Response.Write(""&we0&""&dao&"【<a href='phonep.asp?urls="&urls&"&amp;sid="&sidd&"'>更多品牌</a>】"&we1&""&we&"")
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "select top 16 id,name from qingtian_phonetai order by id asc"
Rs.Open Sql,conn,1,1
if not (rs.bof and rs.eof)  then
For i=1 to 16
		If Rs.Eof Then
			exit For
		End If
if i=1 then Response.Write we2
Response.Write("<a href='search_phone.asp?urls="&urls&"&amp;kw="&server.URLEncode(rs("name"))&"&amp;sid="&sidd&"'>"&qingtian.utf8(rs("name"))&"</a> ")
	 	Rs.MoveNext
	  	Next
Response.Write(".<a href='phonep.asp?urls="&urls&"&amp;sid="&sidd&"'>更多</a>")
 	end if
Rs.close
set rs=nothing
Response.Write(""&we0&""&dao&"【<a href='phonec.asp?urls="&urls&"&amp;sid="&sidd&"'>通用系统</a>】"&we1&""&we&"")
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "select top 16 id,name from qingtian_phonecha order by id asc"
Rs.Open Sql,conn,1,1
if not (rs.bof and rs.eof)  then
For i=1 to 16
		If Rs.Eof Then
			exit For
		End If
if i=1 then Response.Write we2
Response.Write("<a href='phone.asp?action=login&amp;pid="&rs("id")&"&amp;urls="&urls&"&amp;sid="&sidd&"'>"&qingtian.utf8(rs("name"))&"</a> ")
	 	Rs.MoveNext
	  	Next
Response.Write(".<a href='phonec.asp?urls="&urls&"&amp;sid="&sidd&"'>更多</a>")
 	end if
Rs.close
set rs=nothing
%>
<%=we0%>
<%=qingtian.qingsav("7099")%>
<%=we%><a href="<%=qingtian.backurl(urls)%>">返回来源页</a><%=we0%>
<%
End Function

Function loginn
dim title,title1,urls,id,pid,rs,sql,name,name1
		urls=Request.QueryString("urls")
                if urls="" then urls="index.asp"
		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)
                if id<>0 then sidd=sid&"-"&v&"-"&fv&"-"&id
		pid=Request.QueryString("pid")
		if not isnumeric(pid) then pid=0
		if pid="" then pid=0
		pid=clng(pid)
select case v
case "0"
we0="<br/>"
hr="-------------<br/>"
title="<card id=""login"" title=""机型定制""  ontimer="""&qingtian.backurl(urls)&"""><timer value='20'/><p align="""&qingtian.px&""">"
title1="<card id=""login"" title=""机型定制""><p align="""&qingtian.px&""">"
case "1"
hr=""
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
title="<meta name=""keywords"" content="",V1.0""/><meta name=""author"" content=""晴天""/><meta http-equiv=""Cache-Control"" content=""max-age=0"" forua=""true""/><meta http-equiv=""Cache-Control"" content=""no-cache""/><meta http-equiv=""Expires"" content=""0""/><meta http-equiv=""Refresh"" content=""1; url="&Replace(qingtian.backurl(urls), "&amp;", "&")&"""><title>机型定制</title></head><body>"
title1="<title>机型定制</title></head><body>"
End Select
if id=0 and pid<>0 then 
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "select name from qingtian_phonecha where id="&pid&" order by id desc"
Rs.Open Sql,conn,1,1
if not (rs.bof and rs.eof)  then
name1=rs("name")
end if
Rs.close
set rs=nothing
%>
<%=title1%>
<%=dao%>
该平台下的所有机型
<%=we0%>
<%=sou%>
操作系统:<%=name1%>
<%=we0%>
<%=we%>
<%
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "select id,name1 from qingtian_phonemob where bid="&pid&" order by id desc"
Rs.Open Sql,conn,1,1
if not (rs.bof and rs.eof)  then
For i=1 to rs.RecordCount
		If Rs.Eof Then
			exit For
		End If
Response.Write("<a href='phone.asp?action=login&amp;id="&rs("id")&"&amp;urls="&urls&"&amp;sid="&sidd&"'>"&qingtian.utf8(rs("name1"))&"</a> ")
	 	Rs.MoveNext
	  	Next
                else
Response.Write("该平台下没有添加任何机型")
 	end if
Rs.close
set rs=nothing
Response.Write we0
elseif id<>0 and pid=0 then
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "select bid,name,name1 from qingtian_phonemob where id="&id&" order by id desc"
Rs.Open Sql,conn,1,1
if not (rs.bof and rs.eof)  then
name=rs("name1")
name1=conn.execute("select name from [qingtian_phonecha] where id="&rs("bid")&"")("name")
end if
Rs.close
set rs=nothing
%>
<%=title%>
<%=we%>机型定制成功!<br/>
您的手机：<%=name%><br/>
操作系统:<%=name1%><br/>
<a href="<%=qingtian.backurl(urls)%>">如没跳转请点击返回来源页</a><%=we0%>
<%else%>
<%=we%>操作错误机型设置失败！<%=we0%>
<%end if%>
<%=sou%><a href="/phone.asp?sid=<%=sidd%>">返回上级</a><%=we0%>
<%
end function
%>